package com.system.service.Impl;

import com.system.entity.Takecourse;
import com.system.entity.Teachcourse;
import com.system.entity.Entergrade;
import com.system.service.teachCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.CrossOrigin;

import java.util.List;

@CrossOrigin
@Service
public class teachcourseServiceImpl implements teachCourseService {
    @Autowired
    private com.system.dao.TeachcourseMapper teachcourseMapper;

    @Override
    public List<Teachcourse> findByTeacherId(Long tea_id) {
        return teachcourseMapper.findByTeacherId(tea_id);
    }

    @Override
    public Teachcourse findByCourseId(Integer id) {
        return teachcourseMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Entergrade> findBytea_Id(Long tea_id) {
        return teachcourseMapper.findBytea_Id(tea_id);
    }

    @Override
    public List<Entergrade> findBySemester(Long tea_id, String semester) {
        return teachcourseMapper.findBySemester(tea_id,semester);
    }

    @Override
    public List<Entergrade> findByCourseType(Long tea_id, String courseType) {
        return teachcourseMapper.findByCourseType(tea_id,courseType);
    }

    @Override
    public List<Entergrade> findByCourseID(Long tea_id, Integer course_id) {
        return teachcourseMapper.findByCourseID(tea_id,course_id);
    }

    @Override
    public List<Entergrade> findByCourseName(Long tea_id, String course_name) {
        return teachcourseMapper.findByCourseName(tea_id,course_name);
    }

    @Override
    public List<Entergrade> findBySemName(Long tea_id, String semester, String course_name) {
        return teachcourseMapper.findBySemName(tea_id,semester,course_name);
    }

    @Override
    public List<Entergrade> findBySemType(Long tea_id, String semester, String courseType) {
        return teachcourseMapper.findBySemType(tea_id,semester,courseType);
    }

    @Override
    public List<Entergrade> findBySemId(Long tea_id, String semester, Integer course_id) {
        return teachcourseMapper.findBySemId(tea_id,semester,course_id);
    }

    @Override
    public List<Takecourse> findByEveryStudentGrade(Integer course_id) {
        return teachcourseMapper.findByEveryStudentGrade(course_id);
    }

    @Override
    public List<Takecourse> findByEveryStudent(Integer course_id) {
        return teachcourseMapper.findByEveryStudent(course_id);
    }
    public List<Takecourse> findByupdateStudentGrade(Integer course_id) {
        return teachcourseMapper.findByupdateStudentGrade(course_id);
    }

}
